﻿
@{
    ViewBag.Title = "项目管理";
   
}


<div class="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <i class="fa fa-home"></i>
            <a href="@Url.Action("Index","Home")">首页</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="@Url.Action("Index", "Project")">项目</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="#">项目列表</a>
        </li>
    </ul>
</div>
<div ng-controller="ProjectController">
    <!-- Grid -->
        <div class="portlet box blue" ng-hide="isShowForm">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-github"></i>项目列表
                </div>
                <div class="tools">
                    <a href="javascript:;" class="reload" data-original-title="" title="reload" ng-click="Query()"></a>
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="btn-group">
                                <a id="sample_editable_1_new" class="btn green" href="@Url.Action("Creat","Project")" >
                                    新增 <i class="fa fa-plus"></i>
                                </a>
                            </div>
                        </div>

                    </div>
                </div>

                <div class="table-responsive">
                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>项目名称</th>
                            <th>Sln文件</th>
                            <th>Csproj文件</th>
                            <th>GitLab地址</th>
                            <th>项目描述</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="item in items">
                            <td><a  class="text-primary" href="/Project/Detail/{{item.Id}}">{{item.ProjectName}}</a></td>
                            <td>{{item.ProjectSlnName}}</td>
                            <td>{{item.ProjectCsprojName}}</td>
                            <td>{{item.ProjectRepo}}</td>
                            <td>{{item.ProjectDesc}}</td>
                            <td>
                                <div>
                                    <a class="btn btn-primary editor" href="/Project/Edit/{{item.Id}}">编辑</a>
                                    <a class="btn btn-primary delete" ng-click="delete(item)">删除</a>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table> 
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="pull-right">
                            <uib-pagination total-items="totalItems" ng-model="currentPage" ng-change="Query()" first-text="首页" last-text="末页"
                                            previous-text="上一页" next-text="下一页" items-per-page="pageSize" max-size="5" boundary-links="true" boundary-link-numbers="true" rotate="false"></uib-pagination>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <!-- Grid -->
</div>


@section Scripts {
    <script src="~/app/controllers/Project.js"></script>
<script src="~/app/services/ProjectService.js"></script>
}
